package com.jeffse.light.stream.core.data.context;

import com.jeffse.light.stream.core.data.descriptor.operatorDescriptor.OperatorDescriptor;
import com.jeffse.light.stream.core.data.operator.StreamOperator;
import com.jeffse.light.stream.core.pojo.OutTag;

import java.io.Serializable;

public interface Context<KEY, T, V> extends Serializable {
    /**
     * 输出数据
     * @param element
     * @throws Exception
     */
    public  void collect(Object element, OperatorDescriptor operatorDescriptor, OutTag outTag) throws Exception;

    public  void collect(Object element, OutTag outTag) throws Exception;

    public  void collect(Object element, OperatorDescriptor operatorDescriptor) throws Exception;

    public StreamOperator getStreamOperator();

    public void doSink(V value) throws Exception;

}
